package net.xo68.destiny.starter.worker.handler.buildin;

import lombok.extern.slf4j.Slf4j;
import net.xo68.destiny.contract.common.SystemConstants;
import net.xo68.destiny.contract.domain.job.AbortParameter;
import net.xo68.destiny.contract.domain.report.DatagramSerializer;
import net.xo68.destiny.starter.worker.SchedulerWorkerProperties;
import net.xo68.destiny.starter.worker.handler.JobHandleReplyProvider;
import net.xo68.destiny.starter.worker.handler.JobLocalConfigStoreFactory;
import net.xo68.destiny.starter.worker.handler.JobSourceCodeType;
import net.xo68.destiny.starter.worker.handler.impl.AbstractSourceCodeJobHandler;
import org.springframework.stereotype.Component;

@Slf4j
@Component("golangJobHandler")
public class GolangJobHandler extends AbstractSourceCodeJobHandler {


    public GolangJobHandler(SchedulerWorkerProperties schedulerWorkerProperties, JobHandleReplyProvider jobHandleReplyProvider, DatagramSerializer datagramSerializer, JobLocalConfigStoreFactory jobLocalConfigStoreFactory) {
        super(schedulerWorkerProperties,jobHandleReplyProvider,datagramSerializer, jobLocalConfigStoreFactory);
    }

    @Override
    public String consoleEncoding() {
        return SystemConstants.ENCODE_UTF8;
    }

    @Override
    public JobSourceCodeType jobSourceCodeType() {
        return JobSourceCodeType.GOLANG;
    }

    @Override
    public boolean abort(AbortParameter abortParameter) {
        return false;
    }
}
